package com.linewell.dao;

import com.linewell.pojo.Book;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Title: demo
 * @description:
 * @author: hyuhuang@linewell.com
 * @since:2018/4/26
 */
@Repository
public interface BookDao {

    public Book insertBook(Book entity, String test, String tesets);

    public List<Book> findBook(Query query, Pageable pageable);

    public boolean updateBook(String id, Map map);

    public Long updates(Query query, Update update);

    public boolean updateBook(Query query, Update update);

    public Long deletes(Query query);

    void saveBook(Book entity);

    boolean updateBookAll(Query query, Update update);

    void findBooks(Pageable pageable);

    void findBookByCon(Query query);

    void findBookSort(Query query, Pageable pageable);

    void countBook(Query query);
}
